package org.lboot.chat.module.file.service;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lboot.chat.api.file.FileApi;
import org.lboot.chat.module.file.FileListResult;
import org.lboot.chat.module.file.params.LocalFileParams;
import org.lboot.chat.module.file.model.ChatFile;
import org.lboot.chat.module.file.params.WebFileParams;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@AllArgsConstructor
public class ChatFileServiceImpl implements ChatFileService {
    FileApi fileApi;
    @Override
    public ChatFile uploadFile(LocalFileParams params) {
        return fileApi.uploadFile(params);
    }

    @Override
    public ChatFile uploadFile(WebFileParams params) {
        return fileApi.uploadFile(params);
    }

    @Override
    public FileListResult listFiles() {
        return fileApi.listFiles();
    }
}
